.class public Ldata/ShoptTypeData;
.super Landroid/widget/BaseAdapter;
.source "ShoptTypeData.java"


# instance fields
.field c:Landroid/content/Context;

.field lf:Landroid/view/LayoutInflater;

.field ls:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/ShoptypeBean;",
            ">;"
        }
    .end annotation
.end field

.field m:Lmyapp/MyApp;

.field private mListView:Landroid/widget/ListView;

.field selectid:I


# direct methods
.method public constructor <init>(Ljava/util/List;Landroid/content/Context;Landroid/widget/ListView;I)V
    .locals 1
    .param p2, "cc"    # Landroid/content/Context;
    .param p3, "dd"    # Landroid/widget/ListView;
    .param p4, "km"    # I
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lbean/ShoptypeBean;",
            ">;",
            "Landroid/content/Context;",
            "Landroid/widget/ListView;",
            "I)V"
        }
    .end annotation

    .prologue
    .line 41
    .local p1, "list":Ljava/util/List;, "Ljava/util/List<Lbean/ShoptypeBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 42
    invoke-virtual {p2}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lmyapp/MyApp;

    iput-object v0, p0, Ldata/ShoptTypeData;->m:Lmyapp/MyApp;

    .line 43
    iput-object p2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    .line 44
    iput-object p1, p0, Ldata/ShoptTypeData;->ls:Ljava/util/List;

    .line 45
    iput-object p3, p0, Ldata/ShoptTypeData;->mListView:Landroid/widget/ListView;

    .line 46
    iput p4, p0, Ldata/ShoptTypeData;->selectid:I

    .line 47
    return-void
.end method


# virtual methods
.method public Getselectid()I
    .locals 1

    .prologue
    .line 70
    iget v0, p0, Ldata/ShoptTypeData;->selectid:I

    return v0
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 52
    iget-object v0, p0, Ldata/ShoptTypeData;->ls:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "position"    # I

    .prologue
    .line 58
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "position"    # I

    .prologue
    .line 64
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 76
    if-nez p2, :cond_0

    .line 77
    iget-object v2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    invoke-static {v2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v2

    const v3, 0x7f03009a

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 79
    :cond_0
    const v2, 0x7f0c022c

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 80
    .local v0, "areaname":Landroid/widget/TextView;
    iget v2, p0, Ldata/ShoptTypeData;->selectid:I

    if-ne v2, p1, :cond_2

    .line 82
    iget-object v2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 83
    const v3, 0x7f070001

    .line 82
    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 84
    const v2, 0x7f020118

    invoke-virtual {p2, v2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 85
    iget-object v2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 86
    const/high16 v3, 0x7f070000

    .line 85
    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setBackgroundColor(I)V

    .line 90
    iget-object v2, p0, Ldata/ShoptTypeData;->m:Lmyapp/MyApp;

    invoke-virtual {v2}, Lmyapp/MyApp;->getAppcolor()Ljava/lang/String;

    move-result-object v2

    const-string v3, "1"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 91
    const v2, -0xd53e87

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 92
    const v2, 0x7f020025

    invoke-virtual {p2, v2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 105
    :cond_1
    :goto_0
    iget-object v2, p0, Ldata/ShoptTypeData;->ls:Ljava/util/List;

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lbean/ShoptypeBean;

    .line 106
    .local v1, "bb":Lbean/ShoptypeBean;
    invoke-virtual {v1}, Lbean/ShoptypeBean;->getname()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 108
    return-object p2

    .line 97
    .end local v1    # "bb":Lbean/ShoptypeBean;
    :cond_2
    iget-object v2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 98
    const v3, 0x7f070006

    .line 97
    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 99
    const v2, 0x7f020117

    invoke-virtual {p2, v2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 100
    iget-object v2, p0, Ldata/ShoptTypeData;->c:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 101
    const v3, 0x7f070004

    .line 100
    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setBackgroundColor(I)V

    goto :goto_0
.end method

.method public setSelectedPosition(I)V
    .locals 0
    .param p1, "newposition"    # I

    .prologue
    .line 67
    iput p1, p0, Ldata/ShoptTypeData;->selectid:I

    .line 68
    return-void
.end method
